//
//  YLAnimationRefresh.m
//  EasyToTesco2.0
//
//  Created by 杨森 on 16/7/26.
//  Copyright © 2016年 EasyToTesco. All rights reserved.
//

#import "TopPullRefreshAnaimation.h"

@implementation TopPullRefreshAnaimation

- (void)prepare
{
    [super prepare];
    
    // 设置普通状态的动画图片
    NSMutableArray *idleImages = [NSMutableArray array];
    for (NSUInteger i = 1; i<3; i++) {
        UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"diyige_%zd", i]];
        [idleImages addObject:image];
    }
    [self setImages:idleImages forState:MJRefreshStateIdle];
    
    // 设置正在刷新状态的动画图片
    NSMutableArray *refreshingImages = [NSMutableArray array];
    for (NSUInteger i = 1; i<3; i++) {
        UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"diyige_%zd", i]];
        [refreshingImages addObject:image];
    }
    [self setImages:refreshingImages forState:MJRefreshStateRefreshing];

    // 设置正在刷新状态的动画图片
    [self setImages:refreshingImages forState:MJRefreshStateRefreshing];

}

@end
